#pragma once
#include "BaseHttpRequest.h"

class FHeaderHttpRequest : public FBaseHttpRequest
{
public:
	FHeaderHttpRequest();

public:
	virtual bool NeedDeserialized() const override;

	virtual void Serialized(FMemoryWriter &Write) override;
	virtual void Deserialized(FBufferReader &Reader) override;

public:
	FString GetLastModify() const { return m_LastModify;  }
	int32 GetContentLen() { return m_nContentLen; }

protected:
	virtual void InitHeader() override;

protected:
	virtual void CompleteCallback(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bConnectedSuccessfully) override;
	virtual void HeaderReceivedCallback(FHttpRequestPtr Request, const FString& HeaderName, const FString& NewHeaderValue) override;
	virtual void ProgressCallback(FHttpRequestPtr Request, int32 BytesSent, int32 BytesReceived) override;
	virtual void WillRetryCallback(FHttpRequestPtr Request, FHttpResponsePtr Response, float SecondsToRetry) override;

private:
	int32 m_nContentLen;
	FString m_LastModify;
};


